PATH 
Mac OS 8 and 9 Developer Documentation > Text and Other International Services > Apple Type Services for Unicode Imaging (ATSUI) > Apple Type Services for Unicode Imaging Reference

     

ATSUCopyAttributes

Copies the entire contents of a style object into an existing style object.

OSStatus ATSUCopyAttributes (
                     ATSUStyle iSourceStyle,
                     ATSUStyle iDestinationStyle);
iSourceStyle
A reference of type ATSUStyle. Pass a reference to a valid style object whose values you want to copy. You cannot pass NULL for this parameter.

iDestinationStyle
A reference of type ATSUStyle. Pass a reference to a valid style object whose values you want to replace. You cannot pass NULL for this parameter.

function result
A result code. See Result Codes.
DISCUSSION
The ATSUCopyAttributes function copies the contents of the style object you pass in the iSourceStyle parameter into the destination style object, including those style run attribute, font feature, and font variation values that are not set in the source style object. Those style run attributes that are not set in the source style object will be set to the default values listed in Table C-1 in the destination style object. Those font features and font variations that are not set in the source style object will be set to font-default values in the destination style object.

ATSUCopyAttributes does not copy the contents of memory referenced by pointers or handles within custom style run attributes or within reference constants. You are responsible for ensuring that this memory remains valid until the source style object is disposed of.

To create a copy of the entire contents of a style object, call the function ATSUCreateAndCopyStyle. To copy style run attributes, font features, and font variations that were previously set in the source style object into the destination style object, regardless of whether or not these values are set in the destination style object, call the function ATSUOverwriteAttributes. To copy only those style run attributes, font features, and font variations that were previously set in the source style object but not set in the destination style object, call the function ATSUUnderwriteAttributes.

SPECIAL CONSIDERATIONS
ATSUCopyAttributes may allocate memory in your application heap, unless you designate a different heap by calling the function ATSUCreateMemorySetting.

VERSION NOTES
Available beginning with ATSUI 1.0.


© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)